package com.team.service.Impl;



import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.team.dao.AdminiStrationDao;
import com.team.entity.Announcement;
import com.team.entity.CapitalReport;

/**
 * 管理模块service实现类
 */


import com.team.entity.DutyOfficer;
import com.team.entity.Equipment;
import com.team.entity.RepairMan;
import com.team.service.AdminiStrationService;
@Service
@Transactional
public class AdminiStrationServiceImpl implements AdminiStrationService {
	   @Autowired
	  private AdminiStrationDao adminiStrationDaoImpl;
	 
	public void savedutyOfficer(DutyOfficer dutyOfficer) {
		adminiStrationDaoImpl.savedutyOfficer(dutyOfficer);
		
	}

	@Override
	public List<DutyOfficer> listallDutyOfficer() {
		// TODO Auto-generated method stub
		List<DutyOfficer> dutyOfficers=adminiStrationDaoImpl.listAllDutyOfficer();
		return dutyOfficers;
	}

	@Override
	public void saveRepairMan(RepairMan repairMan) {
		// TODO Auto-generated method stub
		adminiStrationDaoImpl.savedepairMan(repairMan);
	}

	@Override
	public List<RepairMan> listallRepairMan() {
		// TODO Auto-generated method stub
		List<RepairMan> repairMan=adminiStrationDaoImpl.listAllRepairMan();
		return repairMan;
	}

	@Override
	public RepairMan finRepairManById(int id) {
		// TODO Auto-generated method stub
	    RepairMan reRepairMan=adminiStrationDaoImpl.finRepairManById(id);
	    return reRepairMan;
	}

	@Override
	public void updRepairMan(RepairMan repairMan) {
		// TODO Auto-generated method stub
		adminiStrationDaoImpl.updateRepairMan(repairMan);
	}

	@Override
	public void delRepairMan(RepairMan repairMan) {
		// TODO Auto-generated method stub
		adminiStrationDaoImpl.delRepairMan(repairMan);
	}

	@Override
	public void saveAnnouncement(Announcement announcement) {
		// TODO Auto-generated method stub
		adminiStrationDaoImpl.saveAnnouncement(announcement);
	}

	@Override
	public List<Announcement> listAllAnnouncement() {
		// TODO Auto-generated method stub
		List<Announcement> announcement=adminiStrationDaoImpl.listAllAnnouncement();
		return announcement;
	}

	@Override
	public Announcement finAnnouncementById(int id) {
		// TODO Auto-generated method stub
		Announcement announcement=adminiStrationDaoImpl.finAnnouncementById(id);
		return announcement;
	}

	@Override
	public List<Equipment> selectEquipmentBystatus() {
		List<Equipment> Equipments=adminiStrationDaoImpl.selectEquipmentBystatus();
		return Equipments;
	}

	@Override
	public void equipmentok(int id) {
		// TODO Auto-generated method stub
	adminiStrationDaoImpl.equipmentok(id);
	}
     //查看月度报表
	@Override
	public List<CapitalReport> listMonthPeport(int month, int pagenum) {
		// TODO Auto-generated method stub
		List<CapitalReport> capitalReports=adminiStrationDaoImpl.listMonthPeport(month, pagenum);
		return capitalReports;
	}
     //保存报表信息
	@Override
	public void saveCapitalReport(CapitalReport capitalReport) {
		// TODO Auto-generated method stub
	 adminiStrationDaoImpl.saveCapitalReport(capitalReport);
	}

	@Override
	public List<CapitalReport> listSeasonPeport(String season, int pagenum) {
		// TODO Auto-generated method stub
		List<CapitalReport> capitalReports=adminiStrationDaoImpl.listSeasonPeport(season, pagenum);
		return capitalReports;
	}

	@Override
	public List<CapitalReport> listYearPeport(int year, int pagenum) {
		// TODO Auto-generated method stub
		List<CapitalReport> capitalReports=adminiStrationDaoImpl.listYearPeport(year, pagenum);

		return capitalReports;
	}

	
	

}
